package cn.wolfcode.shop.redis;

import cn.wolfcode.shop.redis.key.BaseKeyPrefix;

/**
 * 用户信息存储到redis时的前缀设计
 */
public class UserKeyPrefix extends BaseKeyPrefix {
    //响应给用户的cookie的name
    public static final String USER_TOKEN_COOKIE_NAME = "USERTOKEN";
    public static final String USER_LOCK = "USER_LOCK";

    public UserKeyPrefix(String prefix, int expireSeconds) {
            super(prefix, expireSeconds);
    }
    //用户登录信息的前缀和有效时间设置
    public static final UserKeyPrefix USER_TOKEN = new UserKeyPrefix("userToken",60*30);
    public static final UserKeyPrefix USER = new UserKeyPrefix("user",60*30);
    public static final UserKeyPrefix USER_NULL = new UserKeyPrefix("user",10);
}
